<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns the current session status</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.session-start.html">session_start</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.session-unregister.html">session_unregister</a></div>
 <div class="up"><a href="ref.session.html">Session 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.session-status" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">session_status</h1>
  <p class="verinfo">(PHP &gt;=5.4.0)</p><p class="refpurpose"><span class="refname">session_status</span> &mdash; <span class="dc-title">Returns the current session status</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.session-status-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><strong>session_status</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>session_status()</strong></span> is used to return the current session status.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.session-status-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara"><strong><code>PHP_SESSION_DISABLED</code></strong> if sessions are disabled.</span>
    </li>
    <li class="listitem">
     <span class="simpara"><strong><code>PHP_SESSION_NONE</code></strong> if sessions are enabled, but none exists.</span>
    </li>
    <li class="listitem">
     <span class="simpara"><strong><code>PHP_SESSION_ACTIVE</code></strong> if sessions are enabled, and one exists.</span>
    </li>
   </ul>
  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.session-status-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member"><span class="function"><a href="function.session-start.html" class="function" rel="rdfs-seeAlso">session_start()</a> - Start new or resume existing session</span></li>
  </ul>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.session-start.html">session_start</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.session-unregister.html">session_unregister</a></div>
 <div class="up"><a href="ref.session.html">Session 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
